﻿<ccl:CustomChromeWindow x:Class="WPFVarTab.ConfigConnectionsAndSymbolSources"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                        xmlns:ccl="clr-namespace:CustomChromeLibrary;assembly=CustomChromeLibrary"
                        xmlns:Converters="clr-namespace:JFKCommonLibrary.WPF.Converters;assembly=JFKCommonLibrary"
                        Title="Symbol Tables" Height="300" Width="614" Style="{DynamicResource GlassStyle}" WindowStyle="ToolWindow" WindowStartupLocation="CenterOwner">
    <ccl:CustomChromeWindow.Resources>
        <Converters:ObjectToStringConverter x:Key="objectToString"></Converters:ObjectToStringConverter>
    </ccl:CustomChromeWindow.Resources>
        <Grid>
        <DataGrid AutoGenerateColumns="False" Margin="12" Name="dtaConnectionsAndSymbolSources" ItemsSource="{Binding MainWindow.DictonaryConnectionSymboltables}" >
            <DataGrid.Columns>
                <DataGridTextColumn Binding="{Binding Key}" />
                <DataGridTemplateColumn IsReadOnly="True">
                    <DataGridTemplateColumn.CellTemplate>
                        <DataTemplate>
                            <Grid>
                                <TextBlock VerticalAlignment="Center" MinWidth="200" Margin="0,0,20,0" HorizontalAlignment="Left" Text="{Binding Value,Converter={StaticResource objectToString}}" />
                                <Button HorizontalAlignment="Right" Click="Button_Click">...</Button>
                            </Grid>
                            
                        </DataTemplate>
                    </DataGridTemplateColumn.CellTemplate>
                </DataGridTemplateColumn>
            </DataGrid.Columns>
        </DataGrid>
    </Grid>
</ccl:CustomChromeWindow>
